import { createRequest } from './index'
//项目广场的项目列表
export const getProjectList = (data) => {
    return createRequest({
        url: `/student/project/plaza`,
        method: 'get',
				params:{
					...data
				}
    })
}

//收藏项目
export const collectProject = (projectId) => {
    return createRequest({
        url: `/student/collect-project/collect/${projectId}`,
        method: 'post',
    })
}
//取消收藏项目
export const uncollectProject = (projectId) => {
    return createRequest({
        url: `/student/collect-project/cancelCollect/${projectId}`,
        method: 'post',
    })
}

//查看项目时校验年级
export const checkGrade = (id) => {
    return createRequest({
        url: `/student/project/verifyGrade/${id}`,
        method: 'get',
    })
}

//根据id查项目详情
export const getProjectMessage = (projectId) => {
    return createRequest({
        url: `/student/project/detail/${projectId}`,
        method: 'get',
    })
}

//应聘项目
export const joinProject = (projectJobId) => {
    return createRequest({
        url: `/student/student-project/join/${projectJobId}`,
        method: 'post',
    })
}

//获取选择框options列表
export const getOptions = (dictType) => {
    return createRequest({
        url: `/dict/type/${dictType}`,
        method: 'get',
    })
}

